define(function(require, exports, module){
	var cloudlectureTemp = require("text!../template/cloudlecture.html");
	//var Scroll = require("scroll");
	
	module.exports = Nuui.View.extend({

		template:cloudlectureTemp,

		onRender:function(){
            var view = this;


            App.request(App.server.getServePath(App.path.cloudlectureAction), {
                success:function(data){
                    if(data.ec){
                        alert(data.em);
                    }else{
                        var cloudList = data.cloudList.summit;
                        var cloudList1 = data.cloudList.summit1;
					    var tpl= '<dl data-active="summit">\n' +
						   '\t\t\t\t<dt><img src="images/img/'+cloudList.img+'"/></dt>\n' +
						   '\t\t\t\t<dd>'+cloudList.title+'</dd>\n' +
						   '\t\t\t\t<div>\n' +
						   '\t\t\t\t\t<p><span >'+cloudList.person+'</span>人参与<a href="##"><span class="cloud-s2">'+cloudList.alliance+'</span></a><span class="cloudcolor">'+cloudList.over+'</span></p>\n' +
						   '\t\t\t\t\t<p class="cloud-p2">'+cloudList.data + cloudList.time+' <span class="cloud-s3"><label>'+cloudList.cost+'</label></span></p>\n' +
						   '\t\t\t\t</div>\n' +
						   '\t\t\t</dl>\n' +
						   '\t\t\t<dl  data-active="summit1">\n' +
						   '\t\t\t\t<dt><img src="images/img/'+cloudList1.img+'"/></dt>\n' +
						   '\t\t\t\t<dd>'+cloudList1.title+'</dd>\n' +
						   '\t\t\t\t<div>\n' +
						   '\t\t\t\t\t<p><span >'+cloudList1.person+'</span>人参与<a href="##"><span class="cloud-s2">'+cloudList1.alliance+'</span></a><span class="cloudcolor">'+cloudList1.over+'</span></p>\n' +
						   '\t\t\t\t\t<p class="cloud-p2">'+cloudList1.data + cloudList1.time+' <span class="cloud-s3"><label>'+cloudList1.cost+'</label></span></p>\n' +
						   '\t\t\t\t</div>\n' +
						   '\t\t\t</dl>';
						view.$(".cloud-list").html(tpl);
                    }
                }
            });
		},

		onShow:function(){
            $(".cloud-list").on("tap","dl", function(){

                var active=$(this).attr('data-active');
                App.storage.set('activeDetail',active);
                App.navigate("example/index/eventdetails", true);
                return false;
            });
		}
	});
});